package a.a;

import a.c.d;
import a.c.k;
import a.c.q;
import a.c.w;

abstract class u
{
  abstract double a(d[] paramArrayOfd, k paramk, int paramInt);
  
  static u a()
  {
    return new f_(0.2D, 0.4D, 0.4D);
  }
  
  static u a(double paramDouble1, double paramDouble2, double paramDouble3)
  {
    return new f_(paramDouble1, paramDouble2, paramDouble3);
  }
  
  static u b()
  {
    return new e_(null);
  }
  
  static u c()
  {
    return new d_(null);
  }
  
  static u d()
  {
    return new a_(null);
  }
  
  static u e()
  {
    return new b_(null);
  }
  
  static u g()
  {
    return new c_(null);
  }
  
  private static int[] a(q paramq, k paramk, int paramInt)
  {
    int i = m.b;
    boolean bool = m.a;
    int[] arrayOfInt = new int[paramInt];
    w localw = paramq.v();
    do
    {
      while (!bool)
      {
        if (!localw.e()) {
          break;
        }
        if ((i == 0) && (bool)) {
          break label77;
        }
        arrayOfInt[paramk.getInt(localw.d())] += 1;
        localw.f();
      }
    } while (i != 0);
    label77:
    return arrayOfInt;
  }
  
  private static double[][] c(d[] paramArrayOfd, k paramk, int paramInt)
  {
    int j = m.b;
    boolean bool = m.a;
    double[][] arrayOfDouble = new double[2][paramInt];
    int i = 0;
    do
    {
      if (i >= paramArrayOfd.length) {
        break;
      }
      d locald = paramArrayOfd[i];
      if (j == 0)
      {
        if (paramk.getInt(locald.e()) == paramk.getInt(locald.f()))
        {
          arrayOfDouble[0][paramk.getInt(locald.e())] += 1.0D;
          if (j != 0) {
            continue;
          }
          if (!bool) {}
        }
        else
        {
          arrayOfDouble[1][paramk.getInt(locald.e())] += 1.0D;
        }
      }
      else {
        arrayOfDouble[1][paramk.getInt(locald.f())] += 1.0D;
      }
      i++;
    } while (!bool);
    return arrayOfDouble;
  }
  
  private static class c_
    extends u
  {
    private c_() {}
    
    double a(d[] paramArrayOfd, k paramk, int paramInt)
    {
      int k = m.b;
      boolean bool = m.a;
      if (k == 0) {
        if (paramArrayOfd.length == 0) {
          return 0.0D;
        }
      }
      q localq = paramArrayOfd[0].e().g();
      double d = e().a(paramArrayOfd, paramk, paramInt);
      int[] arrayOfInt = u.a(localq, paramk, paramInt);
      int i = 0;
      int j = 0;
      do
      {
        while (!bool)
        {
          if (j >= arrayOfInt.length) {
            break;
          }
          if (k == 0)
          {
            if (arrayOfInt[j] > 0) {
              i += arrayOfInt[j] * (arrayOfInt[j] - 1);
            }
            j++;
          }
        }
      } while (k != 0);
      return 1.0D - 2.0D / (localq.j() * (localq.j() - 1)) * ((1.0D - 2.0D * d / paramArrayOfd.length) * paramArrayOfd.length + 0.5D * i);
    }
    
    c_(u.6 param6)
    {
      this();
    }
  }
  
  private static class b_
    extends u
  {
    private b_() {}
    
    double a(d[] paramArrayOfd, k paramk, int paramInt)
    {
      int k = m.b;
      boolean bool = m.a;
      int i = 0;
      int j = 0;
      do
      {
        if (j >= paramArrayOfd.length) {
          break;
        }
        d locald = paramArrayOfd[j];
        if ((k == 0) && (bool)) {
          break label77;
        }
        if (paramk.getInt(locald.e()) == paramk.getInt(locald.f())) {
          i++;
        }
        j++;
      } while (!bool);
      label77:
      return i;
    }
    
    b_(u.6 param6)
    {
      this();
    }
  }
  
  private static class a_
    extends u
  {
    private a_() {}
    
    double a(d[] paramArrayOfd, k paramk, int paramInt)
    {
      int k = m.b;
      boolean bool = m.a;
      int i = 0;
      int j = 0;
      do
      {
        if (j >= paramArrayOfd.length) {
          break;
        }
        d locald = paramArrayOfd[j];
        if ((k == 0) && (bool)) {
          break label77;
        }
        if (paramk.getInt(locald.e()) != paramk.getInt(locald.f())) {
          i++;
        }
        j++;
      } while (!bool);
      label77:
      return i;
    }
    
    a_(u.6 param6)
    {
      this();
    }
  }
  
  private static class d_
    extends u
  {
    private d_() {}
    
    double a(d[] paramArrayOfd, k paramk, int paramInt)
    {
      int j = m.b;
      boolean bool = m.a;
      if (paramArrayOfd.length == 0) {
        return -0.5D;
      }
      double d1 = 0.0D;
      double[][] arrayOfDouble = u.c(paramArrayOfd, paramk, paramInt);
      int i = 0;
      if (i < paramInt) {
        d1 += arrayOfDouble[0][i] / paramArrayOfd.length;
      }
      while (j != 0)
      {
        double d2 = arrayOfDouble[0][i] + arrayOfDouble[1][i];
        if (j == 0)
        {
          if (bool) {
            break label119;
          }
          d1 -= d2 * d2 / (4.0D * paramArrayOfd.length * paramArrayOfd.length);
          i++;
        }
        if (!bool) {
          break;
        }
      }
      label119:
      return d1;
    }
    
    d_(u.6 param6)
    {
      this();
    }
  }
  
  private static class e_
    extends u
  {
    private e_() {}
    
    double a(d[] paramArrayOfd, k paramk, int paramInt)
    {
      if (paramArrayOfd.length == 0) {
        return 0.0D;
      }
      double d = e().a(paramArrayOfd, paramk, paramInt);
      return d / paramArrayOfd.length;
    }
    
    e_(u.6 param6)
    {
      this();
    }
  }
  
  private static class f_
    extends u
  {
    private final double a;
    private final double b;
    private final double c;
    private final u.e_ d;
    private final u.c_ f;
    private final u.d_ g;
    
    f_(double paramDouble1, double paramDouble2, double paramDouble3)
    {
      this.a = paramDouble1;
      this.b = paramDouble2;
      this.c = paramDouble3;
      this.d = new u.e_(null);
      this.f = new u.c_(null);
      this.g = new u.d_(null);
    }
    
    double a(d[] paramArrayOfd, k paramk, int paramInt)
    {
      return this.a * this.d.a(paramArrayOfd, paramk, paramInt) + this.b * this.f.a(paramArrayOfd, paramk, paramInt) + this.c * this.g.a(paramArrayOfd, paramk, paramInt);
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.a.u

 * JD-Core Version:    0.7.0.1

 */